<!DOCTYPE html>
<html>
<head>
    <title>人力资源数据批量导入</title>
    <meta charset="utf-8">
    <script src="/static/js/jquery-3.4.1.min.js"></script>
</head>
<body>
<h1>人力资源数据批量导入</h1>
<h2>{{ message }}</h2>

<div style="width:0px;height: 30px; background-color: blue;"></div>

已导入:<h3 id="current_count"></h3>

<span>请选择excel文件</span>
<form method="post" action="/do_upload/" enctype="multipart/form-data">
    {% csrf_token  %}
    <input type="file" name="hr_excel" value="">
    <input type="submit" name="submit_button" value="提交">
</form>

<script>
    // 获取当前导入数量
    function get_count() {
        $.get('/get_current_count/', function(data) {
            let current_count = data['current_count'];
            $('#current_count').text(current_count);
        });
    }

    // 定时获取当前数量
    setInterval(get_count, 1000);

</script>
</body>
</html>




